package com.jy.service.impl;

import com.jy.entity.CwParking;
import com.jy.entity.PageInfo;
import com.jy.mapper.CwParkingMapper;
import com.jy.service.ICwParkingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 车位费 服务实现类
 * </p>
 *
 * @author WeiQuan
 * @since 2022-11-14
 */
@Service
public class CwParkingServiceImpl extends ServiceImpl<CwParkingMapper, CwParking> implements ICwParkingService {

    @Resource
    private CwParkingMapper cw;
//  查询车位费 分页
    @Override
    public PageInfo allCwParking(PageInfo pageInfo) {
        pageInfo.setTotalRow(cw.selcwparkingcount());//查总页数
        pageInfo.setDatas(cw.allCwParking(pageInfo));//根据开始行和每页行数 查当前页数据
        return pageInfo;
    }
//  添加车位费数据
    @Override
    public int addcwparking(CwParking cwParking) {
        return cw.addcwparking(cwParking);
    }
//  删除车位费数据
    @Override
    public int delcwparking(Integer pid) {
        return cw.delcwparking(pid);
    }
//  修改车位费数据
    @Override
    public int upcwparking(CwParking cwParking) {
        return cw.upcwparking(cwParking);
    }
}
